Ext.namespace('GBIF');
Ext.namespace('GBIF.GeoSpatial');

GBIF.GeoSpatial.WFSTDataGridPanel = function(config){

	var store = new Ext.data.JsonStore({
			fields: [
					{name:'name', type:'string',mapping:'properties.name'}
				,	{name:'id', type:'string'}
				,	{name:'state', type:'string'}
        	]
	}); 

	Ext.apply(this,config,{
				    title: 'WFS-T Grid'
				,	border:false
				,	width:400
				,	split:true
				,	layer:''
				,	store:store
				,	id:'grid'
				,	sm: new Ext.grid.RowSelectionModel({singleSelect:true})
				,   columns: [
									{header: "Name", dataIndex:'name',editor: new Ext.form.TextField(),markDirty: false}
								,	{header: "id", dataIndex:'id',autoWidth:true}
								,	{header: "state", dataIndex:'state'}
							]
				,	tbar:[
							{
								text:'Commit'
							,	ref:'../commit'
							}	
							]
			});

	GBIF.GeoSpatial.WFSTDataGridPanel.superclass.constructor.call(this, config)
}
Ext.extend(GBIF.GeoSpatial.WFSTDataGridPanel, Ext.grid.EditorGridPanel, {
	
})
